package com.zego.wawaji.ui.center.question.adapter;

import android.widget.TextView;

import com.zego.wawaji.R;
import com.zego.wawaji.ui.base.recycler.BaseRecyclerViewAdapter;
import com.zego.wawaji.ui.base.recycler.BaseRecyclerViewHolder;
import com.zego.wawaji.ui.center.question.bean.Question;

/**
 * 常见问题列表
 * Created by Su on 2018/4/12.
 */
public class QuestionAdapter extends BaseRecyclerViewAdapter<Question> {
    @Override
    public int[] getItemLayouts() {
        return new int[]{R.layout.question_item};
    }

    @Override
    public void onBindRecycleViewHolder(BaseRecyclerViewHolder viewHolder, int position) {
        final Question data = getItem(position);

        TextView q_title = viewHolder.findViewById(R.id.q_title);
        TextView q_content = viewHolder.findViewById(R.id.q_content);

        q_title.setText("Q：" + data.getTitle());
        q_content.setText(data.getContent());
    }

    @Override
    public int getRecycleViewItemType(int position) {
        return 0;
    }
}
